Run scripts in debug mode to troubleshoot and fix script errors.
Keep the following in mind before debugging scripts:
1. Open a script and then choose Debug > Debug Script.
Note: If a script is set as the main script for the workspace, you can debug it without opening it. Choose Debug > Debug Main Script. See Setting and running a main script.
The script stops running when an error occurs or the first breakpoint is reached. Breakpoints indicate the step to stop playback on.
2. Troubleshoot the script using the following debug commands.
| Command | Description |
|---|---|
| Toggle Breakpoint | Adds or removes a breakpoint. |
| Remove All Breakpoints | Removes all breakpoints. |
| Continue | Runs script steps up to the next breakpoint or the end of the script. |
| Step | Runs the next script step. If the next step is a CallScript statement, QA Wizard Pro runs the entire called script. |
| Step Into | Pauses playback and allows you to step through a called script, using the Step command. If the next step is a CallScript statement, QA Wizard Pro runs the entire called script. If there is a breakpoint on a CallScript statement, QA Wizard Pro opens the called script and allows you to step through it. |
| Set Next Statement | Sets the next statement to run when playback continues. Use to run statements again or skip some statements while debugging. You can only set the next statement when playback is paused. |
| Stop | Stops running the script in debug mode. You must stop running in debug mode before you can modify scripts. |
Note: You can use the call stack to trace the functions called to the point when an error occurs or a breakpoint is reached. Choose View > Call Stack to display the stack information.